package cn.edu.abtu.controller.front;

import cn.edu.abtu.service.EduTeacherService;
import cn.edu.abtu.vo.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/eduservice/teacherfront")
public class TeacherFrontController {

    @Autowired
    private EduTeacherService eduTeacherService;

    //1.分页查询讲师的方法
    @PostMapping("getTeacherFrontList/{page}/{limit}")
    public ResponseData getTeacherFrontList(@PathVariable Integer page,
                                            @PathVariable Integer limit){
        return eduTeacherService.getTeacherFrontList(page,limit);
    }

    @GetMapping("getTeacherFrontInfo/{id}")
    public ResponseData getTeacherFrontInfo(@PathVariable String id){
        return eduTeacherService.getTeacherFrontInfo(id);
    }
}
